<template>
	<view class="confirm-order">
		<block v-if="show">
			<!-- 地址信息 -->
			<view class="confirm-order-address" @click="jumpAddressList">
				<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon1.png" class="address-icon"></image>
				<view class="no-address" v-if="!orderBrowseList.address.address_id">您还没有添加过地址或没有默认地址，点击添加或设置</view>
				<view class="address-info" v-else>
					<view class="address-info-name"><text>{{orderBrowseList.address.consignee}}</text><text>{{orderBrowseList.address.mobile}}</text></view>
					<view class="address-info-detail">
						<text v-if="orderBrowseList.address.province">{{orderBrowseList.address.province}}</text>
						<text v-if="orderBrowseList.address.city">{{orderBrowseList.address.city}}</text>
						<text v-if="orderBrowseList.address.district">{{orderBrowseList.address.district}}</text>
						<text v-if="orderBrowseList.address.address">{{orderBrowseList.address.address}}</text>
					</view>
				</view>
				<image class="arrow-icon" src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon2.png"></image>
			</view>
			<view class="address-border">
				<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon3.png"></image>
			</view>
			<!-- 地址信息 -->
			<!-- 订单信息 -->
			<view class="confirm-order-goods">
				<view class="confirm-order-goods-item" v-for="(data,index) in orderBrowseList.store_list" :key="index">
					<view class="confirm-order-goods-name">{{data.store_name}}</view>
					<view class="confirm-order-goods-list" v-if="data.goods_sku">
						<view class="goods-item" v-for="(item,i) in data.goods_sku" :key="item.cart_id">
							<view class="tag" v-if="item.goods_type==3 || item.goods_type==8">换购</view>
							<image :src="item.img"></image>
							<view class="goods-item-info">
								<view class="goods-item-name">{{item.goods_name}}</view>
								<view class="goods-item-attributes">
									<text v-if="item.color">{{item.color}}</text>
									<text v-if="item.size">{{item.size}}</text>
									<text v-if="item.lining">{{item.lining}}</text>
									<text>数量：{{item.num}}</text>
									<text style="color: #F59359;" v-if="item.send_name">货期：{{item.send_name}}</text>
								</view>
								<view class="goods-item-price">
									<view class="goods-item-price-left">
										￥<text>{{userInfo.role_type==2 || userInfo.role_type==11?item.self_price:item.retail_price}}</text>
									</view>
									<view class="remark">
										<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon4.png"></image>
										<input type="text" placeholder="请输入商品备注(选填)" v-model="item.brief" @blur="inputRemark($event,index,i,1)" />
									</view>
								</view>
								<view class="msg" v-if="item.msg && (item.goods_type==3 || item.goods_type==8)">{{item.msg}}</view>
							</view>
						</view>
					</view>
					<view class="confirm-order-goods-list" v-if="data.group">
						<view class="goods-item" v-for="(item,i) in data.group" :key="item.cart_id">
							<image :src="item.image_thumb"></image>
							<view class="goods-item-info">
								<view class="goods-item-name">{{item.group_name}}</view>
								<view class="goods-item-attributes">
									<text v-if="item.color">{{item.color}}</text>
									<text v-if="item.size">{{item.size}}</text>
									<text v-if="item.lining">{{item.lining}}</text>
									<text>数量：{{item.num}}</text>
								</view>
								<view class="goods-item-price">
									<view class="goods-item-price-left">￥<text>{{item.retail_price}}</text></view>
									<view class="remark">
										<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon4.png"></image>
										<input type="text" placeholder="请输入套餐备注(选填)" v-model="item.brief" @blur="inputRemark($event,index,i,2)"/>
									</view>
								</view>
							</view>
						</view>
					</view>
					<view class="confirm-order-goods-func">
						<u-cell-group :border="false">
							<!-- <u-cell-item title="是否包邮" :value="orderBrowseList.free_express==1?'不包邮':'包邮'" hover-class="false"></u-cell-item>
							<u-cell-item title="优惠券" @click="choseCoupon(data.coupon,index)">
								<view v-if="!data.coupon.length">无可用</view>
								<view v-else-if="data.couponInfo.coupon_id" style="color: #141414;">已选择：{{data.couponInfo.card_name}}({{data.couponInfo.amount}})</view>
								<view v-else style="color: red;">{{data.coupon.length}}张优惠券 (未选择)</view>
							</u-cell-item> -->
							<u-cell-item title="易碎险" :arrow="false" v-if="userInfo.role_type!=1 && orderBrowseList.insure_price">
								<view class="insure">
									<u-switch v-model="insure" size="40" activeColor="#F59359" @change="init()"></u-switch>
									<text class="price">￥{{orderBrowseList.insure_price}}</text>
								</view>
							</u-cell-item>
							<u-cell-item title="收货注意事项" value="点击查看" @click="lookReceipt"></u-cell-item>
							<u-cell-item hover-class="false" :arrow="false" :use-label-slot="true" class="order-remark-cell">
								<view class="remark" slot="label">
									<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon4.png"></image>
									<input type="text" placeholder="请输入订单备注(选填)" v-model="data.brief"/>
								</view>
							</u-cell-item>
						</u-cell-group>
					</view>
				</view>
			</view>
			<!-- 订单信息 -->
			<!-- 商家需选择配送方式 -->
			<view class="confirm-order-goods-delivery" v-if="userInfo.role_type==2 || userInfo.role_type==11">
				<u-cell-group :border="false">
					<u-cell-item title="配送方式"
						:title-style="{
							fontSize: '28rpx',
							color: '#141414'
						}" @click="choseLogistics">
						<view class="delivery-chosed">
							<view>
								<text>已选择物流：</text>
								{{logisticsInfo.logistics_type==1?'总部物流':'商家物流：'}}
								{{logisticsInfo.company_name}}
							</view>
							<view>
								<text>送货方式：</text>
								<block>{{serverList[logisticsInfo.service - 1].sericve}}</block>
								<text style="margin-right: 10rpx;"></text>
								<block>{{serverList[logisticsInfo.service - 1].sericve_address}}</block>
							</view>
						</view>
					</u-cell-item>
					<u-cell-item title="费用选择" hover-class="false" :arrow="false" :title-style="{ fontSize: '28rpx', color: '#141414'}" v-if="userInfo.store_type==1 && userInfo.role_type!=1">
						<u-radio-group v-model="express_type">
							<u-radio :name="1" size="36" active-color="#141414" label-size="24">总部承担</u-radio>
							<u-radio :name="2" size="36" active-color="#141414" label-size="24">业主承担</u-radio>
							<u-radio :name="3" size="36" active-color="#141414" label-size="24">其他</u-radio>
						</u-radio-group>
					</u-cell-item>
					<u-cell-item title="物流说明" hover-class="false" :arrow="false" :use-label-slot="true" class="order-remark-cell" v-if="userInfo.store_type==1 && userInfo.role_type!=1">
						<view class="remark" slot="label">
							<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon4.png"></image>
							<input type="text" v-model="express_brief" placeholder="请输入物流说明"/>
						</view>
					</u-cell-item>
				</u-cell-group>
			</view>
			<!-- 商家需选择配送方式 -->
			<!-- 订单总信息 -->
			<view class="confirm-order-goods-payway">
				<u-cell-group :border="false">
					<u-cell-item title="商品总额" hover-class="false" :arrow="false"
						:title-style="{
							fontSize: '28rpx',
							color: '#141414'
						}">
						<view class="price">
							￥<text>{{userInfo.role_type==2 || userInfo.role_type==11?orderBrowseList.self_price:orderBrowseList.retail_price}}</text>
						</view>
					</u-cell-item>
					<u-cell-item title="结算类型" hover-class="false" :arrow="false" :title-style="{ fontSize: '28rpx', color: '#141414'}">
						<u-radio-group v-model="settlement_type" @change="init()">
							<u-radio :name="1" size="36" active-color="#141414" label-size="24">全款</u-radio>
							<u-radio :name="2" size="36" active-color="#141414" label-size="24">首款结算({{orderBrowseList.advance_charge}}%)</u-radio>
						</u-radio-group>
					</u-cell-item>
					<!-- #ifdef MP-WEIXIN -->
					<!-- <u-cell-item title="微信支付" hover-class="false" :arrow="false" icon="weixin-fill" icon-size="40"
						:title-style="{
							fontSize: '28rpx',
							color: '#141414'
						}">
						<u-checkbox name="wechatPay" size="36" active-color="#141414" :disabled="true" v-model="payWay" label-size="0" disabled="true" style="margin-right: -24rpx;"></u-checkbox>
					</u-cell-item> -->
					<!-- #endif -->
					<u-cell-item :title="`余额支付(可用余额:￥${orderBrowseList.store_info.store_money})`" :arrow="false" :title-style="{ fontSize: '28rpx',color: '#141414'}">
						<image style="width: 32rpx; height: 32rpx; margin-right: 6rpx;" slot="icon" src="@/static/svg/icon4.svg" mode=""></image>
						<u-radio-group v-model="pay_id">
							<u-radio :name="3" size="36" active-color="#141414" label-size="0"></u-radio>
						</u-radio-group>
					</u-cell-item>
					<u-cell-item title="线下支付" :arrow="false" :title-style="{fontSize: '28rpx',color: '#141414'}">
						<image style="width: 32rpx; height: 32rpx; margin-right: 6rpx;" slot="icon" src="@/static/svg/icon5.svg" mode=""></image>
						<u-radio-group v-model="pay_id">
							<u-radio :name="4" size="36" active-color="#141414" label-size="0"></u-radio>
						</u-radio-group>
					</u-cell-item>
				</u-cell-group>
			</view>
			<!-- 订单总信息 -->
			<!-- 底部按钮 -->
			<view class="confirm-order-goods-btns">
				<view class="confirm-order-goods-btns-price">
					<text>共 {{num}} 件，合计：</text>
					<text class="price">￥<text>{{userInfo.role_type==2 || userInfo.role_type==11?orderBrowseList.self_price:orderBrowseList.retail_price}}</text></text>
				</view>
				<view :class="['confirm-order-goods-btns-submit',{isPay: isPay}]" @click="$u.throttle(submit, 2000)">
					<u-loading mode="flower" style="margin-right: 20rpx;" v-if="isPay"></u-loading>
					{{isPay?'支付中':'提交订单'}}
				</view>
			</view>
			<!-- 底部按钮 -->
			<!-- 优惠券弹窗选择-->
			<uni-popup ref="coupon" type="bottom" class="coupon-pop">
				<view class="coupon-list">
					<view class="coupon-list-tit">选择优惠券 <u-icon name="close" color="#999" @click="closeCoupon"></u-icon></view>
					<scroll-view scroll-y class="coupon-list-box">
						<view class="coupon-item-list">
							<view class="coupon-item" v-for="(data,index) in couponList" :key="index" @click="choseCouponEvent(data.coupon_list_id,data.use_price,data.card_type,data.card_name,data.amount)">
								<view class="coupon-item-left">
									<view class="coupon-item-left-text">
										<view class="coupon-item-left-money" v-if="data.card_type==1">￥<text>{{data.amount}}</text></view>
										<view class="coupon-item-left-money" v-if="data.card_type==2"><text>{{data.discount}}</text>折</view>
										<view class="coupon-item-left-des">满{{data.use_price}}可用</view>
									</view>
									<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon5.png"></image>
								</view>
								<view class="coupon-item-right">
									<view class="coupon-name">{{data.card_name}}</view>
									<view class="coupon-time">有效期截至：{{data.end_time}}</view>
								</view>
								<view :class="['cpupon-checked',{active: couponInfo.coupon_id==data.coupon_list_id}]">
									<u-icon name="checkbox-mark" color="#FFF" v-if="couponInfo.coupon_id==data.coupon_list_id" size="20"></u-icon>
								</view>
							</view>
						</view>
					</scroll-view>
				</view>
			</uni-popup>
			<!-- 优惠券弹窗选择-->
			<!-- 商家物流选择弹窗 -->
			<uni-popup ref="logistics" type="bottom" class="logistics-pop" @change="logisticsChange">
				<view class="logistics-box">
					<view class="logistics-box-tit">物流选择 <u-icon name="close" color="#999" @click="closeLogistics"></u-icon></view>
					<view class="logistics-box-tabs">
						<u-tabs
							ref="logisticsTabs"
							:list="[{name: '总部物流'}]" 
							:current="logisticsIndex" 
							@change="changeLogisticsType" 
							active-color="#141414"
							inactiveColor="#757575"
							fontSize="28">
						</u-tabs>
						<!-- <view class="add" v-if="logisticsIndex==1"><u-icon name="plus" color="#141414"></u-icon>添加</view> -->
					</view>
					<scroll-view scroll-y class="logistics-list">
						<view class="logistics-info" v-if="logisticsIndex==0">
							<view class="delivery-item" v-for="(data,index) in orderBrowseList.platform_delivery" @click="choseLogisticsItem(data.end_logistics.log_id,data.company_name,1)" :key="index">
								<view class="delivery-item-tit">
									<text>{{data.company_name}}</text>
									<view :class="['logistics-chose',{active: logisticsInfo.log_id==data.end_logistics.log_id}]">
										<u-icon name="checkbox-mark" color="#FFF" v-if="logisticsInfo.log_id==data.end_logistics.log_id" size="20"></u-icon>
									</view>
								</view>
								<view class="delivery-item-start">
									<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon8.png" class="line"></image>
									<view class="delivery-item-left">
										<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon7.png"></image>
									</view>
									<view class="delivery-item-right">
										<view class="delivery-item-info"><text>{{data.start_logistics.consignee}}</text><text>{{data.start_logistics.mobile}}</text></view>
										<view class="delivery-item-address">
											<text v-if="data.start_logistics.province">{{data.start_logistics.province}}</text>
											<text v-if="data.start_logistics.city">{{data.start_logistics.city}}</text>
											<text v-if="data.start_logistics.district">{{data.start_logistics.district}}</text>
											<text v-if="data.start_logistics.address">{{data.start_logistics.address}}</text>
										</view>
									</view>
								</view>
								<view class="delivery-item-end">
									<view class="delivery-item-left">
										<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon6.png"></image>
									</view>
									<view class="delivery-item-right">
										<view class="delivery-item-info"><text>{{data.end_logistics.consignee}}</text><text>{{data.end_logistics.mobile}}</text></view>
										<view class="delivery-item-address">
											<text v-if="data.end_logistics.province">{{data.end_logistics.province}}</text>
											<text v-if="data.end_logistics.city">{{data.end_logistics.city}}</text>
											<text v-if="data.end_logistics.district">{{data.end_logistics.district}}</text>
											<text v-if="data.end_logistics.address">{{data.end_logistics.address}}</text>
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="logistics-info" v-if="logisticsIndex==1 && orderBrowseList.store_delivery.length">
							<view class="delivery-item" v-for="(data,index) in orderBrowseList.store_delivery" @click="choseLogisticsItem(data.end_logistics.log_id,data.company_name,2)" :key="index">
								<view class="delivery-item-tit">
									<text>{{data.company_name}}</text>
									<view :class="['logistics-chose',{active: logisticsInfo.log_id==data.end_logistics.log_id}]">
										<u-icon name="checkbox-mark" color="#FFF" v-if="logisticsInfo.log_id==data.end_logistics.log_id" size="20"></u-icon>
									</view>
								</view>
								<view class="delivery-item-start">
									<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon8.png" class="line"></image>
									<view class="delivery-item-left">
										<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon7.png"></image>
									</view>
									<view class="delivery-item-right">
										<view class="delivery-item-info"><text>{{data.start_logistics.consignee}}</text><text>{{data.start_logistics.mobile}}</text></view>
										<view class="delivery-item-address">
											<text v-if="data.start_logistics.province">{{data.start_logistics.province}}</text>
											<text v-if="data.start_logistics.city">{{data.start_logistics.city}}</text>
											<text v-if="data.start_logistics.district">{{data.start_logistics.district}}</text>
											<text v-if="data.start_logistics.address">{{data.start_logistics.address}}</text>
										</view>
									</view>
								</view>
								<view class="delivery-item-end">
									<view class="delivery-item-left">
										<image src="https://jiajudashi.oss-cn-shenzhen.aliyuncs.com/images/shop/icons/confirmOrder/icon6.png"></image>
									</view>
									<view class="delivery-item-right">
										<view class="delivery-item-info"><text>{{data.end_logistics.consignee}}</text><text>{{data.end_logistics.mobile}}</text></view>
										<view class="delivery-item-address">
											<text v-if="data.end_logistics.province">{{data.end_logistics.province}}</text>
											<text v-if="data.end_logistics.city">{{data.end_logistics.city}}</text>
											<text v-if="data.end_logistics.district">{{data.end_logistics.district}}</text>
											<text v-if="data.end_logistics.address">{{data.end_logistics.address}}</text>
										</view>
									</view>
								</view>
							</view>
						</view>
						<pt-nothing :text="'请在商家端添加物流'" v-if="logisticsIndex==1 && !orderBrowseList.store_delivery.length"></pt-nothing>
						<view class="logistics-serve">
							<view class="logistics-serve-tit">送货方式<text>(物流费用及服务费用需商家、客户自理)</text></view>
							<view class="logistics-serve-list">
								<view class="logistics-serve-item" v-for="(data,index) in serverList" :key="index" @click="choseServe(data.name)">
									<view class="logistics-serve-item-info">
										<view class="logistics-serve-item-tit">
											<view><text>{{data.sericve}}</text><text>{{data.sericve_address}}</text></view>
											<view></view>
											<!-- <view v-if="logisticsIndex==0">￥<text>{{data.sericve_price}}</text></view>
											<view v-if="logisticsIndex==1">￥<text>{{merchantLogistics[index]}}</text></view> -->
										</view>
										<view class="logistics-serve-item-brife">{{data.brife}}</view>
									</view>
									<view :class="['logistics-chose',{active: logisticsInfo.service==data.name}]">
										<u-icon name="checkbox-mark" color="#FFF" v-if="logisticsInfo.service==data.name" size="20"></u-icon>
									</view>
								</view>
							</view>
						</view>
					</scroll-view>
					<view class="confirmLogistics" @click="closeLogistics">确认</view>
				</view>
			</uni-popup>
			<!-- 商家物流选择弹窗 -->
			<!-- 提示弹窗 -->
			<uni-popup type="center" ref="notice">
				<pt-notice title="温馨提示" :html="orderBrowseList.order_msg" @closeNotice="closeNotice" @confirmNotice="confirmNotice"></pt-notice>
			</uni-popup>
			<!-- 提示弹窗 -->
			<!-- 注意事项弹窗 -->
			<uni-popup type="center" ref="receipt">
				<pt-notice title="收货注意事项" :html="ReceiptHtml" @closeNotice="closeReceipt" @confirmNotice="confirmReceipt"></pt-notice>
			</uni-popup>
			<!-- 注意事项弹窗 -->
			
			<!-- 密码校验 -->
			<uni-popup type="center" ref="PasswordVerifiers">
				<view class="PasswordVerifiers">
					<view class="PasswordVerifiers-tit">请输入支付密码</view>
					<u-message-input :maxlength="6" :dot-fill="true" @finish="PasswordVerifiers" active-color="#F59359"></u-message-input>
				</view>
			</uni-popup>
			<!-- 密码校验 -->
			<!-- APP选择支付方式 -->
			<u-action-sheet 
				:list="payWayList" 
				v-model="showPayWay" 
				:tips="{text: '请选择支付方式'}" 
				:cancel-btn="true" 
				border-radius="10" 
				@click="appPay">
			</u-action-sheet>
			<!-- APP选择支付方式 -->
		</block>
		<pt-loading></pt-loading>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				userInfo: {},
				pay_id: 3,
				payWay: true,
				isPay: false,
				orderBrowseList: {},
				choseCouponIndex: '',
				couponInfo: {
					coupon_id: '',
					use_price: '',
					card_type: '',
					card_name: ''
				},
				couponList: [],
				serverList: [{
					name: 1,
					checked: true,
					sericve: '服务1',
					sericve_address: '物流点自提',
					brife: '货物发往客户住处物流点，需客户自行前去提取。',
					sericve_price: 0
				},{
					name: 2,
					checked: false,
					sericve: '服务2',
					sericve_address: ' 送货到业主家',
					brife: '货物由物流负责运送至客户家中。',
					sericve_price: 0
				},{
					name: 3,
					checked: false,
					sericve: '服务3',
					sericve_address: '送货+安装',
					brife: '物流送货到家加安装师傅上门安装。',
					sericve_price: 0
				}],
				merchantLogistics: [0,0,0,0],
				logisticsIndex: 0,
				logisticsInfo: {
					logistics_type: 1,
					log_id: '',
					company_name: '',
					service: 1
				},
				ids: '',
				ReceiptHtml: '<p><b>1、</b>非总部物流（联运汇）的售后，请自行与物流协商处理。</p><p><b>2、</b>外包装破损严重的请直接拒收;轻微破损的，请当场拆包检查，有问题的请异常签收;并拍照留凭证，回传给我们。</p><p><b>3、</b>若产品有售后请保留外包装待协商好后再处理外包装。</p><p><b>4、</b>对于大理石、岩板、玻璃易损品物流保丢不包损。</p><p><b>5、</b>收货，售后问题，请在48小时内在后台（订单系统）提交售后具体问题，超时不受理。</p><p><b>6、</b>售后问题请在系统上按规范提交以便我们快速处理。</p>',
				payWayList: [{
					text: '微信支付',
					color: ''
				},{
					text: '支付宝支付',
					color: ''
				}],
				showPayWay: false,
				num: 0,
				insure: false,
				isOpen: false,
				isOpen1: false,
				express_type: 1,
				settlement_type: 1,
				express_brief: ''
			};
		},
		onLoad(options) {
			this.userInfo = uni.getStorageSync('userInfo')?JSON.parse(uni.getStorageSync('userInfo')):''
			this.ids = options.ids
			this.init()
		},
		methods: {
			// 接收地址参数
			choseAddressFun(object){
				if(object){
					this.orderBrowseList.address.address_id = object.address_id
					this.init()
				}
			},
			init(address_id){
				this.$u.api.order_browse({
					cart_id_list: this.ids,
					address_id: this.orderBrowseList.address?this.orderBrowseList.address.address_id:'',
					coupon_id: this.couponInfo.coupon_id,
					is_insure: this.insure?1:0,
					settlement_type: this.settlement_type
				}).then(res => {
					this.show = true
					let brief = []
					if(this.orderBrowseList.store_list && this.orderBrowseList.store_list.length){
						this.orderBrowseList.store_list.forEach(item => {
							brief.push(item.brief)
						})
					}
					this.orderBrowseList = res.datas
					let couponInfo = {
						coupon_id: '',
						use_price: '',
						card_type: '',
						card_name: ''
					}
					this.orderBrowseList.store_list.forEach((item,index) => {
						this.$set(item,'brief',brief[index] || '')
						if(this.couponInfo.coupon_id){
							this.$set(item,'couponInfo',this.couponInfo)
						}else{
							this.$set(item,'couponInfo',couponInfo)
						}
					})
					if(this.orderBrowseList.order_msg){
						this.$nextTick(() => {
							if(!this.isOpen1){
								this.$refs.notice.open()
								this.isOpen1 = true
							}
						})
					}
					this.num = 0
					res.datas.store_list.forEach(item=>{
						if(item.goods_sku){
							item.goods_sku.forEach(data=>{
								this.num += data.num
							})
						}
						if(item.group){
							item.group.forEach(data=>{
								this.num += data.num
							})
						}
					})
					this.$nextTick(() => {
						if(!this.isOpen && this.$refs.receipt){
							this.$refs.receipt.open()
							this.isOpen = true
						}
					})
				})
			},
			jumpAddressList(){
				uni.navigateTo({
					animationDuration: 500,
					url: '/my/address-list/address-list?type=preview'
				})
			},
			// 填写商品备注
			inputRemark(e,index,i,type){
				if(e.detail.value){
					if(type==1){
						this.$u.api.SetBrief({cart_id: this.orderBrowseList.store_list[index].goods_sku[i].cart_id,brief: e.detail.value})
					}else{
						this.$u.api.SetBrief({cart_id: this.orderBrowseList.store_list[index].group[i].cart_id,brief: e.detail.value})
					}
				}
			},
			// 选择优惠券
			choseCoupon(couponList,index){
				if(!couponList.length){
					uni.showToast({
						icon: 'none',
						title: '此订单暂无可用优惠券'
					})
					return false
				}
				couponList.forEach(item => {
					this.$set(item,'checked',false)
				})
				this.couponList = couponList
				this.choseCouponIndex = index
				this.$refs.coupon.open()
			},
			choseCouponEvent(coupon_id,use_price,card_type,card_name,amount){
				if(this.couponInfo.coupon_id==coupon_id){
					this.$refs.coupon.close()
					this.couponInfo.coupon_id = ''
					let obj = {
						coupon_id: '',
						use_price: '',
						card_type: '',
						card_name: ''
					}
					this.$set(this.orderBrowseList.store_list[this.choseCouponIndex],'couponInfo',obj)
					this.init()
					return 
				}
				this.couponInfo = {
					coupon_id: coupon_id,
					use_price: use_price,
					card_type: card_type,
					card_name: card_name,
					amount:amount
				}
				if(this.couponInfo.coupon_id){
					let obj = {
						coupon_id: coupon_id,
						use_price: use_price,
						card_type: card_type,
						card_name: card_name,
						amount:amount
					}
					this.$set(this.orderBrowseList.store_list[this.choseCouponIndex],'couponInfo',obj)
				}
				this.$refs.coupon.close()
				this.init()
			},
			closeCoupon(){
				this.$refs.coupon.close()
			},
			// 选择物流弹窗
			choseLogistics(){
				this.$refs.logistics.open()
			},
			logisticsChange(e){
				if(e.show){
					this.$nextTick(() => {
						this.$refs.logisticsTabs.init()
					})
				}
			},
			// 切换总部物流和商家物流
			changeLogisticsType(e){
				this.logisticsIndex = e
			},
			// 关闭物流选择弹窗
			closeLogistics(){
				this.$refs.logistics.close()
			},
			// 选择物流
			choseLogisticsItem(log_id,company_name,logistics_type){
				this.logisticsInfo.logistics_type = logistics_type
				this.logisticsInfo.log_id = log_id
				this.logisticsInfo.company_name = company_name
			},
			// 选择服务
			choseServe(name){
				this.logisticsInfo.service = name
			},
			// 支付密码验证
			async PasswordVerifiers(e){
				await this.$u.api.PasswordVerifiers({privat_key: e})
				this.submit(1)
			},
			// 提交订单发起支付
			async submit(success){
				if(this.isPay){
					uni.showToast({
						icon: 'none',
						title: '请勿重复提交'
					})
					return
				}
				if(!this.orderBrowseList.address.address_id){
					uni.showToast({
						icon: 'none',
						title: '请选择收货地址'
					})
					return
				}
				if(!this.express_type && this.orderBrowseList.store_info.store_type==1 && this.userInfo.role_type!=1){
					return uni.showToast({
						icon: 'none',
						title: '请勾选费用选择'
					})
				}else if(this.express_type==3 && !this.express_brief && this.orderBrowseList.store_info.store_type==1 && this.userInfo.role_type!=1){
					return uni.showToast({
						icon: 'none',
						title: '请输入物流说明'
					})
				}
				let order_json = []
				this.orderBrowseList.store_list.forEach(item => {
					order_json.push({
						store_id: item.store_id,
						brief: item.brief,
						// coupon_list_id: item.couponInfo.coupon_id
					})
				})
				let data = {
					address_id: this.orderBrowseList.address.address_id,
					pay_id: this.pay_id,
					total_price: this.userInfo.role_type==2 || this.userInfo.role_type==11?this.orderBrowseList.self_price:this.orderBrowseList.retail_price,
					order_json: JSON.stringify(order_json),
					pay_client: 1,
					cart_id_list: this.ids,
					logistics_type: this.logisticsInfo.logistics_type,
					log_id: this.logisticsInfo.log_id,
					service_type: this.logisticsInfo.service,
					is_insure: this.insure?1:0,
					express_type: this.express_type,
					settlement_type: this.settlement_type,
					express_brief: this.express_brief,
				}
				this.isPay = true
				try{
					if(this.pay_id==3 && !success){
						this.$refs.PasswordVerifiers.open()
						return
					}
					await this.$u.api.new_order(data)
					if(this.pay_id==4){
						uni.showModal({
							title: '温馨提示',
							content: '订单提交成功，请联系客服进行确认',
							showCancel: false,
							success: (res) => {
								if(res.confirm){
									uni.redirectTo({
										url: '/my/my-order/my-order'
									})
								}
							}
						})
						return
					}
					let price = 0
					if(this.userInfo.role_type==2 || this.userInfo.role_type==11){
						price = this.orderBrowseList.self_price
					}else{
						price = this.orderBrowseList.retail_price
					}
					uni.redirectTo({
						url: '/pages/car/pay-result/pay-result?type=success&price=' + price
					})
				}finally{
					this.isPay = false
				}
				// #ifdef MP-WEIXIN
				// uni.requestSubscribeMessage({
				// 	tmplIds: [
				// 		'VRRLEV4bdonol9VG7nifwDygHILq0_XECLBjlXYWFbA',
				// 		'rscqJFMbLiy1ued_OWF9a9suY6CI49XTt_N4bR8z5Io',
				// 		'H3RhmnBf7e_0OKzqIpJCuC8Qu6J14lKfXgCA42V08eg',
				// 	],
				// 	complete: (complete) => {
				// 		uni.login({
				// 			provider: 'weixin',
				// 			success: (loginRes) => {
				// 				let data = {
				// 					address_id: this.orderBrowseList.address.address_id,
				// 					pay_id: 1,
				// 					total_price: this.userInfo.role_type==2 || this.userInfo.role_type==11?this.orderBrowseList.self_price:this.orderBrowseList.retail_price,
				// 					order_json: JSON.stringify(order_json),
				// 					code: loginRes.code,
				// 					pay_client: 1,
				// 					cart_id_list: this.ids,
				// 					logistics_type: this.logisticsInfo.logistics_type,
				// 					log_id: this.logisticsInfo.log_id,
				// 					service_type: this.logisticsInfo.service,
				// 					is_insure: this.insure?1:0
				// 				}
				// 				if(uni.getExtConfigSync().appid==='wx9528157f77bff5d2'){
				// 					data.pay_client = 8
				// 				}
				// 				this.isPay = true
				// 				this.$u.api.new_order(data).then(res => {
				// 					let price = 0
				// 					if(this.userInfo.role_type==2 || this.userInfo.role_type==11){
				// 						price = this.orderBrowseList.self_price
				// 					}else{
				// 						price = this.orderBrowseList.retail_price
				// 					}
				// 					uni.requestPayment({
				// 						provider: 'wxpay',
				// 						timeStamp: res.datas.timeStamp,
				// 						nonceStr: res.datas.nonceStr,
				// 						package: res.datas.package,
				// 						signType: res.datas.signType,
				// 						paySign: res.datas.paySign,
				// 						success: () => {
				// 							let appid = uni.getExtConfigSync().appid
				// 							if(appid==='wx9528157f77bff5d2'){
				// 								uni.showModal({
				// 									title: '温馨提示',
				// 									content: '是否接收到货提醒?',
				// 									success: (isRevice) => {
				// 										if(isRevice.confirm){
				// 											uni.requestSubscribeMessage({
				// 												tmplIds: ['2jv-jGXkjxfOYX6rDfe6DCRAnhWTpRv5Z9LMQpiDuDM'],
				// 												complete: (ReviceComplete) => {
				// 													if(ReviceComplete)
				// 													uni.redirectTo({
				// 														url: '/pages/car/pay-result/pay-result?type=success&price=' + price
				// 													})
				// 												}
				// 											})
				// 										}else{
				// 											uni.redirectTo({
				// 												url: '/pages/car/pay-result/pay-result?type=success&price=' + price
				// 											})
				// 										}
				// 									}
				// 								})
				// 							}else{
				// 								uni.redirectTo({
				// 									url: '/pages/car/pay-result/pay-result?type=success&price=' + price
				// 								})
				// 							}
				// 						},
				// 						fail: (fail) => {
				// 							console.log(fail)
				// 							uni.redirectTo({
				// 								url: '/pages/car/pay-result/pay-result?type=fail&price=' + price
				// 							})
				// 						},
				// 						complete: (complete) => {
				// 							console.log(complete)
				// 							this.isPay = false
				// 						}
				// 					})
				// 				}).catch((error) => {
				// 					if(error.error.RETURN_MSG){
				// 						uni.showToast({
				// 							icon: 'none',
				// 							title: error.error.RETURN_MSG.return_msg
				// 						})
				// 					}
				// 					this.isPay = false
				// 				})
				// 			},
				// 			fail: (fail) => {
				// 				console.log(fail)
				// 			}
				// 		})
				// 	}
				// })
				// #endif
				// #ifdef APP-PLUS
				this.showPayWay = true
				// #endif
			},
			// APP选择支付方式
			appPay(type){
				if(this.isPay){
					uni.showToast({
						icon: 'none',
						title: '请勿重复提交'
					})
					return
				}
				if(!this.orderBrowseList.address.address_id){
					uni.showToast({
						icon: 'none',
						title: '请选择收货地址'
					})
					return
				}
				this.isPay = true
				let price = 0
				if(this.userInfo.role_type==2 || this.userInfo.role_type==11){
					price = this.orderBrowseList.self_price
				}else{
					price = this.orderBrowseList.retail_price
				}
				let order_json = []
				this.orderBrowseList.store_list.forEach(item => {
					order_json.push({
						store_id: item.store_id,
						brief: item.brief,
						coupon_list_id: item.couponInfo.coupon_id
					})
				})
				let data = {}
				switch (Number(type)){
					case 0:
						data = {
							address_id: this.orderBrowseList.address.address_id,
							pay_id: 1,
							total_price: this.userInfo.role_type==2 || this.userInfo.role_type==11?this.orderBrowseList.self_price:this.orderBrowseList.retail_price,
							order_json: JSON.stringify(order_json),
							pay_client: 2,
							cart_id_list: this.ids,
							logistics_type: this.logisticsInfo.logistics_type,
							log_id: this.logisticsInfo.log_id,
							service_type: this.logisticsInfo.service,
							is_insure: this.insure?1:0
						}
						this.$u.api.new_order(data).then(res => {
							uni.requestPayment({
								provider: 'wxpay',
								orderInfo: {
									appid: res.datas.appid,
									noncestr: res.datas.noncestr,
									package: res.datas.packages,
									partnerid: res.datas.partnerid,
									prepayid: res.datas.prepayid,
									timestamp: res.datas.timestamp,
									sign: res.datas.sign
								},
								success: (success) => {
									this.isPay = false
									uni.showToast({
										icon: 'none',
										title: '支付成功',
										duration: 1500
									})
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/car/pay-result/pay-result?type=success&price=' + price
										})
									},1500)
								},
								fail: (fail) => {
									this.isPay = false
									uni.showToast({
										icon: 'none',
										title: '支付未完成',
										duration: 1500
									})
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/car/pay-result/pay-result?type=fail&price=' + price
										})
									},1500)
								},
								complete: (complate) => {
									console.log(complate)
								}
							})
						}).catch(() => {
							this.isPay = false
							uni.showToast({
								icon: 'none',
								title: '网络打盹啦，请稍后再试'
							})
						})
						break
					case 1:
						data = {
							address_id: this.orderBrowseList.address.address_id,
							pay_id: 2,
							total_price: this.userInfo.role_type==2 || this.userInfo.role_type==11?this.orderBrowseList.self_price:this.orderBrowseList.retail_price,
							order_json: JSON.stringify(order_json),
							pay_client: 2,
							cart_id_list: this.ids,
							logistics_type: this.logisticsInfo.logistics_type,
							log_id: this.logisticsInfo.log_id,
							service_type: this.logisticsInfo.service,
							is_insure: this.insure?1:0
						}
						this.$u.api.new_order(data).then(res => {
							uni.requestPayment({
								provider: 'alipay',
								orderInfo: res.datas,
								success: (success) => {
									this.isPay = false
									uni.showToast({
										icon: 'none',
										title: '支付成功',
										duration: 1500
									})
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/car/pay-result/pay-result?type=success&price=' + price
										})
									},1500)
								},
								fail: (fail) => {
									this.isPay = false
									if(fail.errMsg && fail.errMsg.indexOf('系统繁忙')!=-1){
										uni.showToast({
											icon: 'none',
											title: '系统繁忙,请更改支付方式或稍后再试',
											duration: 1500
										})
										return false
									}
									uni.showToast({
										icon: 'none',
										title: '支付未完成',
										duration: 1500
									})
									setTimeout(() => {
										uni.redirectTo({
											url: '/pages/car/pay-result/pay-result?type=fail&price=' + price
										})
									},1500)
								}
							})
						}).catch(() => {
							this.isPay = false
							uni.showToast({
								icon: 'none',
								title: '网络打盹啦，请稍后再试'
							})
						})
						break;
				}
			},
			closeNotice(){
				this.$refs.notice.close()
			},
			confirmNotice(){
				this.$refs.notice.close()
			},
			lookReceipt(){
				this.$refs.receipt.open()
			},
			closeReceipt(){
				this.$refs.receipt.close()
			},
			confirmReceipt(){
				this.$refs.receipt.close()
			}
		},
		mounted() {
			
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #F9F9F9;
	}
	.PasswordVerifiers{
		width: 650rpx;
		background-color: #FFF;
		border-radius: 20rpx;
		padding: 30rpx;
		.PasswordVerifiers-tit{
			text-align: center;
			font-weight: bold;
			font-size: 32rpx;
			margin-bottom: 30rpx;
		}
	}
	.confirm-order{
		padding-bottom: 160rpx;
		.confirm-order-address{
			display: flex;
			align-items: center;
			padding: 30rpx;
			background-color: #FFF;
			.address-icon{
				width: 30rpx;
				height: 36rpx;
			}
			.arrow-icon{
				width: 12rpx;
				height: 22rpx;
			}
			.no-address{
				margin: 0 30rpx;
				flex: 1;
				color: red;
			}
			.address-info{
				margin: 0 30rpx;
				flex: 1;
				min-width: 0;
				.address-info-name{
					font-weight: bold;
					font-size: 32rpx;
					color: #141414;
					text{
						margin-right: 30rpx;
					}
				}
				.address-info-detail{
					margin-top: 20rpx;
					font-size: 28rpx;
					color: #4D4D4D;
				}
			}
		}
		.address-border{
			background-color: #FFF;
			height: 6rpx;
			image{
				width: 100%;
				height: 6rpx;
			}
		}
		.confirm-order-goods{
			margin-top: 30rpx;
			.confirm-order-goods-item{
				background-color: #FFF;
				margin-bottom: 30rpx;
				padding: 30rpx 30rpx 0;
				&:last-child{
					margin-bottom: 0;
				}
				.confirm-order-goods-name{
					font-size: 28rpx;
					color: #141414;
					font-weight: bold;
				}
				.confirm-order-goods-list{
					.goods-item{
						display: flex;
						margin-top: 50rpx;
						position: relative;
						.tag{
							position: absolute;
							z-index: 1;
							left: 0;
							top: 0;
							height: 36rpx;
							line-height: 36rpx;
							background-color: #FEF7F2;
							border-radius: 4rpx 0px 4rpx 0px;
							font-size: 22rpx;
							color: #F59359;
							padding: 0 10rpx;
						}
						image{
							width: 176rpx;
							height: 176rpx;
							border: solid 1px #EFEFEF;
						}
						.goods-item-info{
							flex: 1;
							min-width: 0;
							margin-left: 30rpx;
							.goods-item-name{
								white-space: nowrap;
								overflow: hidden;
								text-overflow: ellipsis;
								font-size: 28rpx;
								color: #141414;
							}
							.goods-item-attributes{
								margin-top: 20rpx;
								color: #757575;
								font-size: 22rpx;
								text{
									margin-right: 20rpx;
								}
							}
							.goods-item-price{
								display: flex;
								align-items: flex-start;
								margin-top: 30rpx;
								.goods-item-price-left{
									font-size: 24rpx;
									color: #141414;
									margin-right: 60rpx;
									text{
										font-size: 32rpx;
									}
								}
								.remark{
									flex: 1;
									min-width: 0;
									display: flex;
									align-items: flex-start;
									margin-top: 6rpx;
									image{
										width: 25rpx;
										height: 25rpx;
										border: none;
										margin-right: 20rpx;
										margin-top: 6rpx;
									}
									input{
										flex: 1;
										font-size: 22rpx;
										color: #757575;
									}
								}
							}
							.msg{
								margin-top: 20rpx;
								font-size: 24rpx;
								color: #F59359;
							}
						}
					}
				}
				.confirm-order-goods-func{
					margin: 50rpx -30rpx 0;
					border-top: solid 1px #F5F5F5;
					padding-bottom: 30rpx;
					.remark{
						display: flex;
						align-items: flex-start;
						margin-top: 6rpx;
						image{
							width: 25rpx;
							height: 25rpx;
							border: none;
							margin-right: 20rpx;
							margin-top: 6rpx;
						}
						input{
							flex: 1;
							font-size: 22rpx;
							color: #757575;
						}
					}
					.insure{
						display: flex;
						align-items: center;
						justify-content: flex-end;
						.price{
							color: #F59359;
							font-size: 24rpx;
							margin-left: 10rpx;
						}
					}
				}
				/deep/ .u-radio-group{
					display: flex;
					justify-content: flex-end;
				}
				/deep/ .u-cell{
					padding: 20rpx 30rpx;
				}
				/deep/ .order-remark-cell .u-cell_title{
					width: 100% !important;
				}
				/deep/ .u-border-bottom:after{
					display: none;
				}
			}
		}
		.confirm-order-goods-delivery{
			margin-top: 30rpx;
			.delivery-chosed{
				color: #141414;
				text{
					color: #999;
				}
			}
			.remark{
				display: flex;
				align-items: flex-start;
				margin-top: 20rpx;
				image{
					width: 25rpx;
					height: 25rpx;
					border: none;
					margin-right: 20rpx;
					margin-top: 6rpx;
				}
				input{
					flex: 1;
					font-size: 22rpx;
					color: #757575;
				}
			}
			/deep/ .u-radio-group{
				display: flex;
				justify-content: flex-end;
			}
			/deep/ .u-border-bottom:last-child:after{
				display: none;
			}
			/deep/ .order-remark-cell .u-cell_title{
				width: 100% !important;
			}
		}
		.confirm-order-goods-payway{
			margin-top: 30rpx;
			/deep/ .price{
				color: #141414;
				font-size: 24rpx;
				font-weight: bold;
				text{
					font-size: 32rpx;
				}
			}
			/deep/ .u-radio-group{
				display: flex;
				justify-content: flex-end;
			}
			/deep/ .u-border-bottom:last-child:after{
				display: none;
			}
			/deep/ .u-checkbox__icon-wrap--disabled{
				border-color: #141414;
				background-color: #141414;
			}
		}
		.confirm-order-goods-btns{
			border-top: solid 1px #F5F5F5;
			position: fixed;
			z-index: 10;
			left: 0;
			right: 0;
			bottom: 0;
			background-color: #FFF;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 20rpx 30rpx;
			.confirm-order-goods-btns-price{
				font-size: 24rpx;
				color: #141414;
				text.price{
					color: #F59359;
					font-weight: bold;
					text{
						font-size: 36rpx;
					}
				}
			}
			.confirm-order-goods-btns-submit{
				width: 330rpx;
				height: 90rpx;
				line-height: 90rpx;
				text-align: center;
				color: #FFF;
				border-radius: 8rpx;
				font-size: 28rpx;
				font-weight: bold;
				background-color: #141414;
				display: flex;
				align-items: center;
				justify-content: center;
				&.isPay{
					opacity: .5;
				}
			}
		}
		.coupon-list{
			background-color: #FFF;
			min-height: 20%;
			border-radius: 20rpx 20rpx 0 0;
			padding: 30rpx 30rpx 0;
			.coupon-list-tit{
				position: relative;
				text-align: center;
				font-size: 36rpx;
				color: #141414;
				/deep/ .u-icon{
					position: absolute;
					right: 0;
					top: 50%;
					transform: translateY(-50%);
				}
			}
			.coupon-list-box{
				max-height: 800rpx;
				min-height: 400rpx;
				margin-top: 70rpx;
				.coupon-item-list{
					.coupon-item{
						display: flex;
						align-items: center;
						margin-bottom: 70rpx;
						background-color: #FAFAFC;
						border-radius: 6rpx;
					}
					.coupon-item-left{
						position: relative;
						width: 200rpx;
						image{
							width: 200rpx;
							height: 150rpx;
						}
						.coupon-item-left-text{
							position: absolute;
							text-align: center;
							width: 100%;
							left: 0;
							top: 50%;
							transform: translateY(-50%);
							z-index: 1;
							color: #FFF;
							.coupon-item-left-money{
								font-size: 24rpx;
								text{
									font-size: 42rpx;
									margin: 0 10rpx;
								}
							}
							.coupon-item-left-des{
								font-size: 20rpx;
								margin-top: 10rpx;
							}
						}
					}
					.coupon-item-right{
						flex: 1;
						min-width: 0;
						margin-left: 30rpx;
						.coupon-name{
							font-weight: bold;
						}
						.coupon-time{
							margin-top: 10rpx;
							color: #999;
							font-size: 24rpx;
						}
					}
					.cpupon-checked{
						width: 36rpx;
						height: 36rpx;
						display: flex;
						align-items: center;
						justify-content: center;
						border-radius: 4rpx;
						border: solid 4rpx #CCC;
						margin-right: 30rpx;
						transition: all .5s;
						&.active{
							border-color: #141414;
							background-color: #141414;
						}
					}
				}
			}
		}
		.logistics-box{
			background-color: #FFF;
			padding: 30rpx 30rpx 0;
			border-radius: 20rpx 20rpx 0 0;
			.confirmLogistics{
				height: 80rpx;
				line-height: 80rpx;
				text-align: center;
				background-color: #141414;
				color: #FFF;
				font-size: 28rpx;
				margin: 0 -30rpx;
			}
			.logistics-box-tit{
				display: flex;
				justify-content: space-between;
				align-items: center;
				font-size: 36rpx;
				color: #141414;
				font-weight: bold;
			}
			.logistics-box-tabs{
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 50rpx;
				margin-left: -30rpx;
				.add{
					border: solid 2rpx #141414;
					border-radius: 8rpx;
					width: 125rpx;
					height: 56rpx;
					display: flex;
					align-items: center;
					justify-content: center;
				}
			}
			.logistics-list{
				background-color: #F9F9F9;
				padding: 30rpx;
				margin: 0 -30rpx;
				max-height: 800rpx;
				.logistics-info{
					.delivery-item{
						background-color: #FFF;
						padding: 30rpx;
						border-radius: 4rpx;
						.delivery-item-tit{
							border-bottom: solid 2rpx #F5F5F5;
							font-size: 32rpx;
							color: #141414;
							padding-bottom: 30rpx;
							display: flex;
							justify-content: space-between;
							.logistics-chose{
								width: 36rpx;
								height: 36rpx;
								display: flex;
								align-items: center;
								justify-content: center;
								border-radius: 4rpx;
								border: solid 4rpx #CCC;
								transition: all .5s;
								&.active{
									border-color: #141414;
									background-color: #141414;
								}
							}
						}
						.delivery-item-start,.delivery-item-end{
							margin-top: 30rpx;
							display: flex;
							align-items: center;
							.delivery-item-left{
								margin-right: 40rpx;
								image{
									width: 48rpx;
									height: 60rpx;
								}
							}
							.delivery-item-right{
								flex: 1;
								min-width: 0;
								.delivery-item-info{
									font-weight: bold;
									color: #141414;
									font-size: 32rpx;
									text{
										margin-right: 30rpx;
									}
								}
								.delivery-item-address{
									margin-top: 20rpx;
									color: #4D4D4D;
									font-size: 28rpx;
								}
							}
						}
						.delivery-item-start{
							position: relative;
							.line{
								position: absolute;
								width: 2rpx;
								height: 100%;
								left: 23rpx;
								top: 50%;
							}
						}
						.delivery-item-end{
							margin-top: 50rpx;
						}
					}
				}
				.logistics-serve{
					background-color: #FFF;
					padding: 30rpx;
					border-radius: 4rpx;
					margin-top: 30rpx;
					.logistics-serve-tit{
						font-size: 32rpx;
						color: #141414;
						border-bottom: solid 2rpx #F5F5F5;
						padding-bottom: 30rpx;
						text{
							font-size: 24rpx;
							color: #F59359;
							margin-left: 20rpx;
						}
					}
					.logistics-serve-list{
						.logistics-serve-item{
							display: flex;
							align-items: center;
							border-bottom: solid 2rpx #F5F5F5;
							padding: 40rpx 0;
							&:last-child{
								border-bottom: none;
								padding-bottom: 0;
							}
							.logistics-serve-item-info{
								flex: 1;
								min-width: 0;
								margin-right: 30rpx;
								.logistics-serve-item-tit{
									font-weight: bold;
									font-size: 32rpx;
									display: flex;
									align-items: center;
									justify-content: space-between;
									text{
										margin-right: 20rpx;
									}
									view:last-child{
										color: #F59359;
									}
								}
								.logistics-serve-item-brife{
									font-size: 24rpx;
									color: #757575;
									margin-top: 20rpx;
								}
							}
							.logistics-chose{
								width: 36rpx;
								height: 36rpx;
								display: flex;
								align-items: center;
								justify-content: center;
								border-radius: 4rpx;
								border: solid 4rpx #CCC;
								transition: all .5s;
								&.active{
									border-color: #141414;
									background-color: #141414;
								}
							}
						}
					}
				}
			}
		}
	}
</style>
